#ifndef RESULTANALYZER_H
#define RESULTANALYZER_H
#include <AnalyzerSettings.h>
#include <AnalyzerTypes.h>

class Frame;
class ILCDCommand;

class ResultAnalyzer
{
public:
    ResultAnalyzer();
    virtual ~ResultAnalyzer();
    virtual const char* Analyze( Frame& TargetFrame ) = 0;

protected:
    std::string  Buffer;
    std::vector<ILCDCommand*> CommandList;

protected:
    void CreateCommands();
    void DeleteCommands();
};

class ErrorRequestAnalyzer : public ResultAnalyzer
{
public:
    ErrorRequestAnalyzer() {}
    virtual ~ErrorRequestAnalyzer() {}
    virtual const char* Analyze( Frame& TargetFrame );
};

class WriteRequestAnalyzer : public ResultAnalyzer
{
public:
    WriteRequestAnalyzer() {}
    virtual ~WriteRequestAnalyzer() {}
    virtual const char* Analyze( Frame& TargetFrame );
};

class ReadBusyFlagRequestAnalyzer : public ResultAnalyzer
{
public:
    ReadBusyFlagRequestAnalyzer() {}
    virtual ~ReadBusyFlagRequestAnalyzer() {}
    virtual const char* Analyze( Frame& TargetFrame );
};

class ReadDataRequestAnalyzer : public ResultAnalyzer
{
public:
    ReadDataRequestAnalyzer() {}
    virtual ~ReadDataRequestAnalyzer() {}
    virtual const char* Analyze( Frame& TargetFrame );
};

class ControlRequestAnalyzer : public ResultAnalyzer
{
public:
    ControlRequestAnalyzer() {}
    virtual ~ControlRequestAnalyzer() {}
    virtual const char* Analyze( Frame& TargetFrame );
};

class ErrorRequestAnalyzer8Bits : public ResultAnalyzer
{
public:
    ErrorRequestAnalyzer8Bits() {}
    virtual ~ErrorRequestAnalyzer8Bits() {}
    virtual const char* Analyze( Frame& TargetFrame );
};

class WriteRequestAnalyzer8Bits : public ResultAnalyzer
{
public:
    WriteRequestAnalyzer8Bits() {}
    virtual ~WriteRequestAnalyzer8Bits() {}
    virtual const char* Analyze( Frame& TargetFrame );
};

class ReadBusyFlagRequestAnalyzer8Bits : public ResultAnalyzer
{
public:
    ReadBusyFlagRequestAnalyzer8Bits() {}
    virtual ~ReadBusyFlagRequestAnalyzer8Bits() {}
    virtual const char* Analyze( Frame& TargetFrame );
};

class ReadDataRequestAnalyzer8Bits : public ResultAnalyzer
{
public:
    ReadDataRequestAnalyzer8Bits() {}
    virtual ~ReadDataRequestAnalyzer8Bits() {}
    virtual const char* Analyze( Frame& TargetFrame );
};

class ControlRequestAnalyzer8Bits : public ResultAnalyzer
{
public:
    ControlRequestAnalyzer8Bits() {}
    virtual ~ControlRequestAnalyzer8Bits() {}
    virtual const char* Analyze( Frame& TargetFrame );
};

#endif